<?php

class DesignTimeWorkflowNode extends AbstractDesignTimeWorkflowNode {

  /**
   * @var string
   */
  protected $class;

  /**
   * @param string $identifier
   * @param string $class
   */
  public function __construct ($identifier, $class)
  {
    parent::__construct($identifier);
    
    $this->class = $class;
  }

  /**
   * @param RunTimeWorkflow $workflow
   * @return AbstractRunTimeWorkflowNode
   */
  public function createRunTimeNode (RunTimeWorkflow $workflow)
  {
    return new $this->class($workflow, $this);
  }
}